home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 025a / prgmchk.zip / COLSUM.CMD < prev    next >
OS/2 REXX Batch file  |  1991-08-07  |  1KB  |  40 lines

  1. *(COLSUM.CMD - calculates total number of columns,tables & rows in the current
  2.                database.                     3 June 91, RBase 3.1; Wm Driskell)
  3.  
  4. SET QUOTES=NULL
  5. SET QUOTES='
  6. set mess off
  7. out temp$$
  8.  list
  9. out scr
  10. create tab Q$$ (name1$ text 8,col1$ int, row1$ int,name2$ text 8, col2$ int, +
  11.  row2$ int)
  12. set error mess off                        *(supress error messages)
  13. out nul                                   *(also suppress warning messages)
  14.  load Q$$ from temp$$; fill
  15. out scr                                   *(restore warnings)
  16. set error mess on
  17.  
  18. set zero on
  19. compute COL$sum as sum(col1$ + col2$) from Q$$
  20. compute ROW$sum as sum(row1$ + row2$) from Q$$
  21. compute TABL1knt as count(name1$) from Q$$
  22. compute TABL2knt as count(name2$) from Q$$
  23. set v tabl$knt = (.tabl1knt + .tabl2knt)
  24. drop table Q$$
  25. cls
  26. list
  27. set v vout text = ('Total number of tables: ' & ctxt(TABL$knt) + ' of 80 max')
  28. write .vout
  29. set v vout = ('Total number of columns: '  & ctxt(COL$sum) + ' of 800 max')
  30. write .vout
  31. set v vout = ('Total rows of data: ' & ctxt(ROW$sum))
  32. write .vout
  33. write ' '
  34. delete temp$$
  35. set mess on
  36. set zero off
  37. clear VARIABLES COL$sum,ROW$sum,TABL$knt,vout,tabl1knt,tabl2knt
  38. return
  39.  
  40.